// 配置路由地址
export const asyncRoute = [
  {
    path: "/permission",
    name: "ACL",
    component: () => import("@/views/layout/index.vue"),
    meta: { title: "权限管理", icon: "Lock", hidden: false },
    children: [
      {
        path: "/permission/user",
        name: "User",
        component: () => import("@/views/permission/user/index.vue"),
        meta: { title: "用户管理", icon: "Tools", hidden: false },
      },
      {
        path: "/permission/role",
        name: "Role",
        component: () => import("@/views/permission/role/index.vue"),
        meta: { title: "角色管理", icon: "Tools", hidden: false },
      },
      {
        path: "/permission/menu",
        name: "Menu",
        component: () => import("@/views/permission/menu/index.vue"),
        meta: { title: "菜单管理", icon: "Tools", hidden: false },
      },
    ],
  },
];

export const constantRoute = [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: { title: "登录", hidden: true },
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/404/index.vue"),
    meta: { hidden: true },
  },
  {
    path: "/",
    name: "Layout",
    component: () => import("@/views/layout/index.vue"),
    redirect: "/home",
    meta: { hidden: false },
    children: [
      {
        path: "/home",
        name: "Home",
        component: () => import("@/views/home/index.vue"),
        meta: { title: "首页", icon: "HomeFilled", hidden: false },
      },
    ],
  },
];

export const anyRoute = {
  path: "/:pathMatch(.*)*",
  redirect: "/404",
  name: "Any",
  meta: { title: "任意路由", hidden: true },
};
